package com.hq.hotl.pojo;

import java.util.List;

public class PageData<T> {
    private int currentPage;//当前页码，从1开始
    private int pageSize;  //每页记录数
    private int totalPages; //总页数
    private long totalSize; //总记录数
    private int previousPage;//上一页页码
    private int nextPage;//下一页页码
    private List<T> data; //当前页的记录信息

    public PageData() {
        super();
    }

    public PageData(int currentPage, int pageSize, int totalPages, long totalSize, int previousPage, int nextPage, List<T> data) {
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.totalPages = totalPages;
        this.totalSize = totalSize;
        this.previousPage = previousPage;
        this.nextPage = nextPage;
        this.data = data;
    }

    public int getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(int totalPages) {
        this.totalPages = totalPages;
    }

    public long getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(long totalSize) {
        this.totalSize = totalSize;
    }

    public int getPreviousPage() {
        return previousPage;
    }

    public void setPreviousPage(int previousPage) {
        this.previousPage = previousPage;
    }

    public int getNextPage() {
        return nextPage;
    }

    public void setNextPage(int nextPage) {
        this.nextPage = nextPage;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }


    @Override
    public String toString() {
        return "PageData{" +
                "currentPage=" + currentPage +
                ", pageSize=" + pageSize +
                ", totalPages=" + totalPages +
                ", totalSize=" + totalSize +
                ", previousPage=" + previousPage +
                ", nextPage=" + nextPage +
                ", data=" + data +
                '}';
    }

}
